<?php
/**
 * Create account form template
 *
 * @var $this VES_Vendors_Block_Form_Register
 */
?>
<div id="registerbox">
	<h1><?php echo $this->__('Create An Account')?></h1>
	<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
	<?php echo $this->getChildHtml('form_fields_before')?>
	<form class="form-horizontal" action="<?php echo $this->getPostActionUrl() ?>" method="post" id="form-validate" enctype="multipart/form-data">
		<div class="widget-box">
			<div class="widget-title">
				<span class="icon">
					<i class="icon-align-justify"></i>									
				</span>
				<h5><?php echo $this->__('Vendor Information') ?></h5>
			</div>
			<div class="widget-content">
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('First Name')?> <em>*</em></label>
						<div class="controls"><input type="text" id="firstname" name="firstname" value="<?php echo $this->escapeHtml($this->getFormData()->getFirstName()) ?>" title="<?php echo $this->__('First Name')?>" placeholder="<?php echo $this->__('First Name')?>" maxlength="255" class="input-text required-entry"  /></div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('Last Name')?> <em>*</em></label>
						<div class="controls"><input type="text" id="lastname" name="lastname" value="<?php echo $this->escapeHtml($this->getFormData()->getLastName()) ?>" title="<?php echo $this->__('Last Name')?>" placeholder="<?php echo $this->__('Last Name')?>" maxlength="255" class="input-text required-entry"  /></div>
					</div>
				</div>
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('Display Name')?> <em>*</em></label>
						<div class="controls"><input type="text" id="title" name="title" value="<?php echo $this->escapeHtml($this->getFormData()->getTitle()) ?>" title="<?php echo $this->__('Display name')?>" placeholder="<?php echo $this->__('Display name')?>" maxlength="255" class="input-text required-entry"  /></div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('Logo')?> <em>*</em></label>
						<div class="controls"><input type="file"" id="logo" name="logo" value="<?php echo $this->escapeHtml($this->getFormData()->getTitle()) ?>" title="<?php echo $this->__('Logo')?>" placeholder="<?php echo $this->__('Logo')?>" maxlength="255" class="input-text required-entry"  /></div>
					</div>
				</div>
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('Company')?> </label>
						<div class="controls"><input type="text" name="company" id="company" value="<?php echo $this->escapeHtml($this->getFormData()->getCompany()) ?>" title="<?php echo $this->__('Company') ?>" placeholder="<?php echo $this->__('Company')?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('company') ?>" /></div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('Telephone')?> <em>*</em></label>
						<div class="controls"><input type="text" name="telephone" id="telephone" value="<?php echo $this->escapeHtml($this->getFormData()->getTelephone()) ?>" title="<?php echo $this->__('Telephone') ?>" placeholder="<?php echo $this->__('Telephone')?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('telephone') ?>" /></div>
					</div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->__('Address')?> <em>*</em></label>
					<div class="controls"><input type="text" name="address" value="<?php echo $this->escapeHtml($this->getFormData()->getAddress()); ?>" title="<?php echo $this->__('Address') ?>" placeholder="<?php echo $this->__('Address')?>" id="address" class="input-text required-entry" /></div>
				</div>
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('City')?> <em>*</em></label>
						<div class="controls"><input type="text" name="city" value="<?php echo $this->escapeHtml($this->getFormData()->getCity()) ?>" title="<?php echo $this->__('City') ?>" placeholder="<?php echo $this->__('City')?>" class="input-text <?php echo $this->helper('customer/address')->getAttributeValidationClass('city') ?>" id="city" /></div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('State/Province')?> <em>*</em></label>
						<div class="controls">
							<select id="region_id" name="region_id" title="<?php echo $this->__('State/Province') ?>" class="validate-select" style="display:none;">
								<option value=""><?php echo $this->__('Please select region, state or province') ?></option>
							</select>
							<script type="text/javascript">
							//<![CDATA[
								$('region_id').setAttribute('defaultValue', "<?php echo $this->getFormData()->getRegionId() ?>");
							//]]>
							</script>
							<input type="text" id="region" name="region" value="<?php echo $this->escapeHtml($this->getRegion()) ?>" title="<?php echo $this->__('State/Province') ?>" class="input-text" style="display:none;" />
						</div>
					</div>
				</div>
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('Zip/Postal Code')?> :</label>
						<div class="controls"><input type="text" name="postcode" value="<?php echo $this->escapeHtml($this->getFormData()->getPostcode()) ?>" title="<?php echo $this->__('Zip/Postal Code') ?>" placeholder="<?php echo $this->__('Zip/Postal Code') ?>" id="postcode" class="input-text validate-zip-international <?php echo $this->helper('customer/address')->getAttributeValidationClass('postcode') ?>" /></div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('Country')?> :</label>
						<div class="controls"><?php echo $this->getCountryHtmlSelect() ?></div>
					</div>
				</div>
				<div class="clear"></div>
			</div>
		</div>
		<div class="widget-box">
			<div class="widget-title">
				<span class="icon">
					<i class="icon-align-justify"></i>									
				</span>
				<h5><?php echo $this->__('Login Information') ?></h5>
			</div>
			<div class="widget-content nopadding">
				<div class="control-group">
					<label class="control-label"><?php echo $this->__('Email Address') ?> <em>*</em></label>
					<div class="controls"><input type="text" name="email" id="email_address" value="<?php echo $this->escapeHtml($this->getFormData()->getEmail()) ?>" title="<?php echo $this->__('Email Address') ?>" placeholder="<?php echo $this->__('Email Address') ?>" class="input-text validate-email required-entry" /></div>
				</div>
				<div class="control-group">
					<label class="control-label"><?php echo $this->__('Vendor Id') ?> <em>*</em></label>
					<div class="controls"><input type="text" name="vendor_id" id="vendor_id" value="<?php echo $this->escapeHtml($this->getFormData()->getVendorId()) ?>" title="<?php echo $this->__('Vendor Id') ?>" placeholder="<?php echo $this->__('Vendor Id') ?>" class="input-text required-entry validate-code" /></div>
				</div>
				
				<div class="control-group">
					<div class="col col-left">
						<label class="control-label"><?php echo $this->__('Password')?> <em>*</em></label>
						<div class="controls">
							<input type="password" name="password" id="password" title="<?php echo $this->__('Password') ?>" placeholder="<?php echo $this->__('Password') ?>" class="input-text required-entry validate-password" />
						</div>
					</div>
					<div class="col col-right">
						<label class="control-label"><?php echo $this->__('Confirm Password')?> <em>*</em></label>
						<div class="controls">
							<input type="password" name="confirmation" title="<?php echo $this->__('Confirm Password') ?>" placeholder="<?php echo $this->__('Confirm Password') ?>" id="confirmation" class="input-text required-entry validate-cpassword" />
						</div>
					</div>
				</div>
				<div class="clear"></div>			
			</div>
		</div>
		<?php $additionalAttributes = $this->getAdditionalAttributes();?>
		<?php if(sizeof($additionalAttributes)):?>
		<div class="widget-box">
			<div class="widget-title">
				<span class="icon">
					<i class="icon-align-justify"></i>									
				</span>
				<h5><?php echo $this->__('Additional Information') ?></h5>
			</div>
			<div class="widget-content nopadding">
				<?php foreach($additionalAttributes as $attribute):?>
					<?php $isRequired = $attribute->getIsRequired();?>
					<div class="control-group">
						<div class="controls">
							<?php $field = $this->getAttributeInputHtml($attribute);?>
							<?php echo $field->getHtml();?>
						</div>
					</div>
				<?php endforeach;?>
				<div class="clear"></div>			
			</div>
		</div>
		<a href="<?php echo $this->getLoginUrl()?>" class="btn btn-inverse"><?php echo $this->__('Back')?></a>
		<button class="btn btn-success" type="submit"><?php echo $this->__('Save')?></button>
		<?php endif;?>
	</form>
	<script type="text/javascript">
	//<![CDATA[
		new RegionUpdater('country', 'region', 'region_id', <?php echo $this->helper('directory')->getRegionJson() ?>, undefined, 'zip');
		var dataForm = new VarienForm('form-validate', true);
	//]]>
	</script>
</div>
<?php /*?>
<div style="position: fixed; top: 40%; right: 0; background: #FFF;padding: 50px 100px;">
<script type="text/javascript">
function fillInfo(){
	$('firstname').value 		= 'hung';
	$('lastname').value 		= 'vt';
	$('title').value 			= 'test';
	$('telephone').value 		= '0123456789';
	$('address').value 			= '175 Dinh Cong, Hoang Mai';
	$('city').value 			= 'Hanoi';
	$('region_id').value 		= '1';
	$('postcode').value 		= '12312';
	$('email_address').value 	= 'hungvt@vnecoms.com';
	$('vendor_id').value 		= 'test1';
	$('password').value 		= '123123';
	$('confirmation').value 	= '123123';
	
}
</script>
	<button class="btn btn-success" onclick="fillInfo();"><span><span>Fill info</span></span></button>
</div>
*/?>